home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Adobe Air 1.5 / AdobeAIRInstaller.exe / setup.swf / scripts / mx / managers / DragManager.as < prev    next >
Encoding:
Text File  |  2008-10-29  |  2.1 KB  |  80 lines

  1. package mx.managers
  2. {
  3.    import flash.events.MouseEvent;
  4.    import mx.core.DragSource;
  5.    import mx.core.IFlexDisplayObject;
  6.    import mx.core.IUIComponent;
  7.    import mx.core.Singleton;
  8.    import mx.core.mx_internal;
  9.    import mx.managers.dragClasses.DragProxy;
  10.    
  11.    use namespace mx_internal;
  12.    
  13.    public class DragManager
  14.    {
  15.       private static var implClassDependency:DragManagerImpl;
  16.       
  17.       private static var _impl:IDragManager;
  18.       
  19.       mx_internal static const VERSION:String = "3.0.0.0";
  20.       
  21.       public static const NONE:String = "none";
  22.       
  23.       public static const COPY:String = "copy";
  24.       
  25.       public static const MOVE:String = "move";
  26.       
  27.       public static const LINK:String = "link";
  28.       
  29.       public function DragManager()
  30.       {
  31.          super();
  32.       }
  33.       
  34.       private static function get impl() : IDragManager
  35.       {
  36.          if(!_impl)
  37.          {
  38.             _impl = IDragManager(Singleton.getInstance("mx.managers::IDragManager"));
  39.          }
  40.          return _impl;
  41.       }
  42.       
  43.       mx_internal static function get dragProxy() : DragProxy
  44.       {
  45.          return Object(impl).dragProxy;
  46.       }
  47.       
  48.       public static function showFeedback(param1:String) : void
  49.       {
  50.          impl.showFeedback(param1);
  51.       }
  52.       
  53.       public static function acceptDragDrop(param1:IUIComponent) : void
  54.       {
  55.          impl.acceptDragDrop(param1);
  56.       }
  57.       
  58.       public static function doDrag(param1:IUIComponent, param2:DragSource, param3:MouseEvent, param4:IFlexDisplayObject = null, param5:Number = 0, param6:Number = 0, param7:Number = 0.5, param8:Boolean = true) : void
  59.       {
  60.          impl.doDrag(param1,param2,param3,param4,param5,param6,param7,param8);
  61.       }
  62.       
  63.       mx_internal static function endDrag() : void
  64.       {
  65.          impl.endDrag();
  66.       }
  67.       
  68.       public static function get isDragging() : Boolean
  69.       {
  70.          return impl.isDragging;
  71.       }
  72.       
  73.       public static function getFeedback() : String
  74.       {
  75.          return impl.getFeedback();
  76.       }
  77.    }
  78. }
  79.  
  80.